﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Roton.Engine.Memory
{
    public class Block
    {
        MemoryStream stream;

        public Block(byte[] memory)
        {
            stream = new MemoryStream(memory);
            Reader = new BinaryReader(stream);
            Writer = new BinaryWriter(stream);
        }

        public long Position
        {
            get { return stream.Position; }
            set { stream.Position = value; }
        }

        public BinaryReader Reader
        {
            get;
            private set;
        }

        public BinaryWriter Writer
        {
            get;
            private set;
        }
    }
}
